package com.eric.rabbitmq.client;

import lombok.extern.slf4j.Slf4j;
import org.springframework.util.SerializationUtils;

import java.io.IOException;
import java.io.Serializable;

/**
 * @author chenw-i
 * @version 1.0.0
 * @ClassName QueueProduct.java
 * @Description TODO
 * @createTime 2020年07月30日 15:29:00
 */
@Slf4j
public class QueueProduct extends AbsEndPoint{

    public QueueProduct(String endpointName) throws Exception {
        super(endpointName);
    }

    public void sendMessage(Serializable object) throws IOException {
        channel.basicPublish("",endPointName, null, SerializationUtils.serialize(object));
    }
}
